CREATE TABLE [dbo].[TTLOTE_DETR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_LOTE] [dbo].[TD_VC_008] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NULL,
[AA_BNCO] [dbo].[TD_VC_004] NULL,
[MM_BNCO] [dbo].[TD_VC_002] NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NULL,
[NU_CHEQ] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTLOTE_DE__CO_US__308412F8] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTLOTE_DE__FE_US__31783731] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTLOTE_DE__CO_US__326C5B6A] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTLOTE_DE__FE_US__33607FA3] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLOTE_DETR] ADD CONSTRAINT [PK__TTLOTE_D__3E14A03D59C61FAD] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_LOTE]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLOTE_DETR] ADD CONSTRAINT [FK__TTLOTE_DE__CO_EM__61BC4730] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
